package com.toolenaar.socialiceThis;
import java.util.List;

import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Canvas;
import android.graphics.Point;
import android.os.Bundle;

import com.google.android.maps.GeoPoint;
import com.google.android.maps.MapActivity;
import com.google.android.maps.MapController;
import com.google.android.maps.MapView;
import com.google.android.maps.Overlay;
import com.toolenaar.socialiceThis.R;


public class MapTabView extends MapActivity {
	MapView mapView;
	MapController mapController;
	GeoPoint geoPoint;
	
	@Override
	protected void onCreate(Bundle arg0) {
		// TODO Auto-generated method stub
		super.onCreate(arg0);
		setContentView(R.layout.maptabview);
		mapView = (MapView) findViewById(R.id.mapview);
		mapView.setBuiltInZoomControls(true);
		
		mapController = mapView.getController();
		String coordinates[] = {"51.929078","4.457703"};
		double lat = Double.parseDouble(coordinates[0]);
		double lng = Double.parseDouble(coordinates[1]);
		geoPoint = new GeoPoint((int)(lat * 1E6),(int)(lng * 1E6));
		mapController.animateTo(geoPoint);
		mapController.setZoom(12);
		
		//add marker to map
		 //---Add a location marker---
        MapOverlay mapOverlay = new MapOverlay(geoPoint,this.getApplicationContext());
        List<Overlay> listOfOverlays = mapView.getOverlays();
        listOfOverlays.clear();
        listOfOverlays.add(mapOverlay);   
		mapView.invalidate();
		
	}

	@Override
	protected boolean isRouteDisplayed() {
		// TODO Auto-generated method stub
		return false;
	}

}
